package com.lyb.lmvp.demo;

import com.lyb.mvp.net.LApi;

/**
 * Created by lyb on 2017/7/27.
 * Email: 1373519715@qq.com
 * Blog: https://littleiii.github.io
 */

public class ServiceFactory {
    public static final String API_BASE_URL = "http://gank.io/api/";

    private static GankService gankService;

    public static GankService getGankService() {
        if (gankService == null) {
            synchronized (ServiceFactory.class) {
                if (gankService == null) {
                    gankService = LApi.getInstance().getRetrofit(API_BASE_URL, true).create(GankService.class);
                }
            }
        }
        return gankService;
    }

}
